package com.iwhalecloud.bss.kite.cucc.web.service.accept.handler.module;

import org.springframework.stereotype.Service;

import com.iwhalecloud.bss.kite.client.vo.scene.CommonAttrModuleVO;
import com.iwhalecloud.bss.kite.cucc.service.batch.BatchAcceptUtil;
import com.iwhalecloud.bss.kite.web.service.accept.bo.AcceptContext;
import com.iwhalecloud.bss.kite.web.service.accept.bo.SceneModule;
import com.iwhalecloud.bss.kite.web.service.accept.handler.module.CommonAttrModuleHandler;

/**
 * @author lyx
 * @version V1.0
 * @Description:
 * @date 2022/3/14 0014
 */
@Service
public class LocalOrderInfoModuleHandler extends CommonAttrModuleHandler {

    @Override
    public CommonAttrModuleVO dealExecuteSpecialAttr(AcceptContext context, SceneModule sceneModule,
        CommonAttrModuleVO defCommonAttrInfoVO) {
        // 批量受理部分环节，不允许编辑
        if (BatchAcceptUtil.isBatchNode(context.getAcceptRequest().getSceneInstId())
            || BatchAcceptUtil.batchNodeResetIsEdit(context.getAcceptRequest().getSceneInstId())) {
            defCommonAttrInfoVO.setIsEdit("F");
        }
        return defCommonAttrInfoVO;
    }

    @Override
    public CommonAttrModuleVO dealPreviewSpecialAttr(AcceptContext context, SceneModule sceneModule,
        CommonAttrModuleVO defCommonAttrInfoVO) {
        return defCommonAttrInfoVO;
    }
}
